package com.hyl.springbootthymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * IndexController
 *
 * @author hyl
 * @date 2025-01-08
 */
@Controller
public class IndexController {

    @GetMapping("/")
    public String toindex(Model model){
        System.out.println("进入首页");
        model.addAttribute("name","hyl");
        return "index";
    }
}
